#include"Server.hpp"
#include<iostream>
#include<memory>

void Usage(const std::string proc)
{
    std::cerr<<"Usage: "<<proc<<"localport"<<std::endl;
}

int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(0);
    }
    uint16_t port=std::stoi(argv[1]);
    EnableConsolseSyncStrategy();
    std::unique_ptr<Server> user=std::make_unique<Server>(port);
    user->Init();
    user->Start();
    return 0;
}